#ifndef __UART_PROTOCAL_H__
#define __UART_PROTOCAL_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rtthread.h>

//humidifier
typedef enum
{
    ESP_VERSION = 0x00,     //VERSION
    ESP_LED,                //LED
    ESP_FAN,                //风扇
    ESP_PTC,                //加热片
    ESP_HUMIDIFIER,         //加湿器
} ESP_SEND_CMD_T;

typedef enum
{
    AB_TEMP = 0x10,          //温度
    AB_HUMI,                 //湿度
    AB_LIGHT,                //光线
} AB_SEND_CMD_T;


void AB32_msgProc(rt_uint8_t *rxBuff, int len);
void ab_send_msg(rt_uint8_t code, rt_uint8_t data1, rt_uint8_t data2);

rt_uint8_t get_ctrl_val(ESP_SEND_CMD_T cmd_code, rt_uint32_t *ctrl_val);

#endif
